module.exports = function(api) {
  api.cache(true);
  let plugins = [];

  <% if (props.stylingPackage?.name === "unistyles") { %>
    plugins.push([
      'react-native-unistyles/plugin',
      {
        autoProcessRoot: 'app',
        autoProcessImports: ['~/components']
      }
    ]);
  <% } %>

  plugins.push('react-native-worklets/plugin');

  return {
    <% if (props.stylingPackage?.name === "nativewind" || props.stylingPackage?.name === "nativewindui") { %>
      presets: [
        ['babel-preset-expo', { jsxImportSource: 'nativewind' }],
        'nativewind/babel',
      ],
    <% } else { %>
      presets: ['babel-preset-expo'],
    <% } %>
    plugins,
  };
};
